import request from '@/utils/request'

export default {
    getAllWork() {
        return request({
            url: `/weddingindex/work/getAll`,
            method: 'GET',
        })
    },

    getWorkById(id) {
        return request({
            url: `/weddingadmin/work/getById/${id}`,
            method: 'GET',
        })
    },
    pass(id, reason) {
        return request({
            url: `/weddingadmin/work/pass/${id}/${reason}`,
            method: 'PUT',
        })
    },
    noPass(id, reason) {
        return request({
            url: `/weddingadmin/work/noPass/${id}/${reason}`,
            method: 'PUT',
        })
    },
    getWorkPageVo(current, limit) {
        return request({
          url: `/weddingadmin/work/getWorkPageVo/${current}/${limit}`,
          method: 'get',
        })
      },
    
      getWorkPageQueryVo(current, limit, workQuery){
        return request({
            url: `/weddingadmin/work/getWorkPageQuery/${current}/${limit}`,
            method: 'post',
            data: workQuery  //转化json传递
          })
      },
    
      deleteAllSelect(ids) {
        return request({
            url: `/weddingadmin/work/deleteAllSelect`,
            method: 'delete',
            data: ids
        })
      },
      searchByName(workName) {
        return request({
            url: `/weddingadmin/work/searchByName/${workName}`,
            method: 'get',
        })
      },
}